﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Protegidos/Administracao/GENTE_Adm.master" AutoEventWireup="true" CodeFile="wfFolhaPagamento.aspx.cs" Inherits="Protegidos_Administracao_Cadastros__wf_wfFolhaPagamento" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content2" ContentPlaceHolderID="cphSubConteudo" Runat="Server">

<table width="99%" align="center">
    <tr>
        <td>
              
            <div class="Titulo01">Folha de Pagamento</div>
            <div class="Titulo02">Cadastros / Gerais / Contratos / Processos</div>

        </td>    
    </tr>
    <tr>
        <td>
            <table width="99%" align="right">
                <tr>
                    <td>
                        <div class="subTitulo_pagina">Parâmetros</div>
                        <div class="espaco"></div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table> 
                            <tr>
                                <td colspan="2"><span class="textoCZ_12BS">Data Configuração:</span></td>
                            </tr> 
                            <tr>
                                <td style="width: 220px"><span class="textoCZ_12B">Data Inicio:</span></td>
                                <td style="width: 220px"><span class="textoCZ_12B">Data Fim:</span></td>
                            </tr>
                            <tr>
                                <td>
                                    <telerik:RadDatePicker ID="txtDtInicio" runat="server" />
                                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator13" ControlToValidate="txtDtInicio"
                                        InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDtFim" Text="" runat="server" Enabled="false"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                        
                        <br />
                        <table> 
                            <tr>
                                <td colspan="4"><span class="textoCZ_12BS">Salário:</span></td>
                            </tr>              
                            <tr>
                                <td style="width: 220px"><span class="textoCZ_12">Selecione a forma de pagamento:</span></td>
                                <td>
                                    <telerik:RadComboBox ID="rcbFormaPagamento" runat="server" Skin="Telerik" 
                                        Width="240px" EmptyMessage="Selecione" AllowCustomText="True"
                                        AutoPostBack="True" onselectedindexchanged="rcbFormaPagamento_SelectedIndexChanged">
                                        <Items>
                                            <telerik:RadComboBoxItem runat="server" Text="Único" Value="1" />
                                            <telerik:RadComboBoxItem runat="server" Text="2 Parcelas" Value="2" />
                                        </Items>
                                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="rcbFormaPagamento"
                                            InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                                </td>
                            </tr>
                        </table>
                        
                        <%-- Forma Pagamento - Salario - Pagamento Unico --%>
                        <div id="dvPagUnico" runat="server">
                            <table> 
                                <tr>
                                    <td colspan="4"><span class="textoCZ_12B">Pagamento Único</span></td>
                                </tr>  
                                <tr>
                                    <td style="width: 30px"><span class="textoCZ_12">Todo </span></td>
                                    <td style="width: 80px">
                                        <telerik:RadComboBox ID="rcbTpDia1" runat="server" Skin="Telerik" 
                                            Width="70px" EmptyMessage="Selecione" AllowCustomText="True"
                                            AutoPostBack="True" onselectedindexchanged="rcbTpDia1_SelectedIndexChanged">    
                                            <Items>
                                                <telerik:RadComboBoxItem runat="server" Text="Dia" Value="Corrido" />
                                                <telerik:RadComboBoxItem runat="server" Text="Dia Util" Value="Util" />
                                            </Items>                                    
                                            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                        </telerik:RadComboBox>
                                        <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="rcbTpDia1"
                                                InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                                    </td>
                                    <td style="width: 5px"><span class="textoCZ_12">:</span></td>
                                    <td style="width: 90px">
                                        <telerik:RadComboBox ID="rcbDia1" runat="server" Skin="Telerik" 
                                            Width="70px" EmptyMessage="Selecione" AllowCustomText="True">
                                            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                        </telerik:RadComboBox>
                                        <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator3" ControlToValidate="rcbDia1"
                                                InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        
                        <%-- Forma Pagamento - Salario - 2X --%>
                        <div id="dvPag2" runat="server">
                            <table> 
                                <tr>
                                    <td colspan="4"><span class="textoCZ_12B">Adiantamento:</span></td>
                                    <td colspan="4"><span class="textoCZ_12B">Pagamento Principal:</span></td>
                                </tr>             
                                <tr>
                                    <td style="width: 30px"><span class="textoCZ_12">Todo </span></td>
                                    <td style="width: 80px">
                                        <telerik:RadComboBox ID="rcbTpDia2" runat="server" Skin="Telerik" 
                                            Width="70px" EmptyMessage="Selecione" AllowCustomText="True"
                                            AutoPostBack="True" onselectedindexchanged="rcbTpDia2_SelectedIndexChanged">    
                                            <Items>
                                                <telerik:RadComboBoxItem runat="server" Text="Dia" Value="Corrido" />
                                                <telerik:RadComboBoxItem runat="server" Text="Dia Util" Value="Util" />
                                            </Items>                                    
                                            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                        </telerik:RadComboBox>
                                        <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator4" ControlToValidate="rcbTpDia2"
                                                InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                                    </td>
                                    <td style="width: 5px"><span class="textoCZ_12">:</span></td>
                                    <td style="width: 110px">
                                        <telerik:RadComboBox ID="rcbDia2" runat="server" Skin="Telerik" 
                                            Width="70px" EmptyMessage="Selecione" AllowCustomText="True">
                                            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                        </telerik:RadComboBox>
                                        <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator5" ControlToValidate="rcbDia2"
                                                InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                                    </td>
                                    
                                    <td style="width: 30px"><span class="textoCZ_12">Todo </span></td>
                                    <td style="width: 80px">
                                        <telerik:RadComboBox ID="rcbTpDia3" runat="server" Skin="Telerik" 
                                            Width="70px" EmptyMessage="Selecione" AllowCustomText="True"
                                            AutoPostBack="True" onselectedindexchanged="rcbTpDia3_SelectedIndexChanged">    
                                            <Items>
                                                <telerik:RadComboBoxItem runat="server" Text="Dia" Value="Corrido" />
                                                <telerik:RadComboBoxItem runat="server" Text="Dia Util" Value="Util" />
                                            </Items>                                    
                                            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                        </telerik:RadComboBox>
                                        <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator6" ControlToValidate="rcbTpDia3"
                                                InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                                    </td>
                                    <td style="width: 5px"><span class="textoCZ_12">:</span></td>
                                    <td style="width: 90px">
                                        <telerik:RadComboBox ID="rcbDia3" runat="server" Skin="Telerik" 
                                            Width="70px" EmptyMessage="Selecione" AllowCustomText="True">
                                            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                        </telerik:RadComboBox>
                                        <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator7" ControlToValidate="rcbDia3"
                                                InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        
                        
                        <%--13º. Salário--%>
                        <br />
                        <table>
                            <td>
                                <div class="textoCZ_12BS">13º. Salário:</div>
                            </td>  
                            <tr>
                                <td colspan="2"><span class="textoCZ_12B">1ª.parcela – mês de Novembro</span></td>
                            </tr>
                            <tr>
                                <td style="width: 220px"><span class="textoCZ_12">Selecione a forma de pagamento:</span></td>
                                <td>
                                    <telerik:RadComboBox ID="rcb13P1" runat="server" Skin="Telerik" 
                                        Width="240px" EmptyMessage="Selecione" AllowCustomText="True"
                                        AutoPostBack="True" onselectedindexchanged="rcb13P1_SelectedIndexChanged">
                                        <Items>
                                            <telerik:RadComboBoxItem runat="server" Text="Com a folha de novembro" Value="1" />
                                            <telerik:RadComboBoxItem runat="server" Text="Processamento em separado" Value="2" />
                                        </Items>
                                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator8" ControlToValidate="rcb13P1"
                                            InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                                </td>
                            </tr>
                        </table>
                        
                        <%-- 13º. Salário - 1ª.parcela – mês de Novembro --%>  
                    <div id="dv13Parc1" runat="server">
                        <table>       
                            <tr>
                                <td style="width: 30px"><span class="textoCZ_12">Todo </span></td>
                                <td style="width: 80px">
                                    <telerik:RadComboBox ID="rcb13P1Forma" runat="server" Skin="Telerik" 
                                        Width="70px" EmptyMessage="Selecione" AllowCustomText="True"
                                        AutoPostBack="True" onselectedindexchanged="rcb13P1Forma_SelectedIndexChanged"> 
                                        <Items>
                                            <telerik:RadComboBoxItem runat="server" Text="Dia" Value="Corrido" />
                                            <telerik:RadComboBoxItem runat="server" Text="Dia Util" Value="Util" />
                                        </Items>                                    
                                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator9" ControlToValidate="rcb13P1Forma"
                                            InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                                </td>
                                <td style="width: 5px"><span class="textoCZ_12">:</span></td>
                                <td style="width: 90px">
                                    <telerik:RadComboBox ID="rcb13P1Dia" runat="server" Skin="Telerik" 
                                        Width="70px" EmptyMessage="Selecione" AllowCustomText="True">
                                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator15" ControlToValidate="rcb13P1Dia"
                                            InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    
                    <br />
                    
                    <table>  
                        <tr>
                            <td colspan="2"><span class="textoCZ_12B">2ª.parcela – mês de Dezembro</span></td>
                        </tr>
                        <tr>
                            <td style="width: 220px"><span class="textoCZ_12">Selecione a forma de pagamento:</span></td>
                            <td>
                                <telerik:RadComboBox ID="rcb13P2" runat="server" Skin="Telerik" 
                                    Width="240px" EmptyMessage="Selecione" AllowCustomText="True"
                                    AutoPostBack="True" onselectedindexchanged="rcb13P2_SelectedIndexChanged">
                                    <Items>
                                        <telerik:RadComboBoxItem runat="server" Text="Com a folha de dezembro" Value="1" />
                                        <telerik:RadComboBoxItem runat="server" Text="Processamento em separado" Value="2" />
                                    </Items>
                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                </telerik:RadComboBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator10" ControlToValidate="rcb13P2"
                                        InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                            </td>
                        </tr>
                    </table>
                    
                    <%-- 13º. Salário - 2ª.parcela – mês de Novembro --%>  
                    <div id="dv13Parc2" runat="server">
                        <table>       
                            <tr>
                                <td style="width: 30px"><span class="textoCZ_12">Todo </span></td>
                                <td style="width: 80px">
                                    <telerik:RadComboBox ID="rcb13P2Forma" runat="server" Skin="Telerik" 
                                        Width="70px" EmptyMessage="Selecione" AllowCustomText="True"
                                        AutoPostBack="True" onselectedindexchanged="rcb13P2Forma_SelectedIndexChanged">
                                        <Items>
                                            <telerik:RadComboBoxItem runat="server" Text="Dia" Value="Corrido" />
                                            <telerik:RadComboBoxItem runat="server" Text="Dia Util" Value="Util" />
                                        </Items>                                    
                                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator11" ControlToValidate="rcb13P2Forma"
                                            InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                                </td>
                                <td style="width: 5px"><span class="textoCZ_12">:</span></td>
                                <td style="width: 90px">
                                    <telerik:RadComboBox ID="rcb13P2Dia" runat="server" Skin="Telerik" 
                                        Width="70px" EmptyMessage="Selecione" AllowCustomText="True">
                                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator12" ControlToValidate="rcb13P2Dia"
                                            InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                                </td>
                            </tr>
                        </table>
                    </div>
                        
                    
                    </td>    
                </tr>
                <tr>
                    <td align="right">
                        <br /><br />
                        <asp:Label ID="lblResultado" runat="server" Text=""></asp:Label>&nbsp;&nbsp;
                        <asp:Button ID="btnSalvar" runat="server" Text="Salvar" Width="110px" 
                            onclick="btnSalvar_Click" />&nbsp;&nbsp;
                        <asp:Button ID="btnIncluir" runat="server" Text="Incluir" Width="110px" ValidationGroup="1" 
                            onclick="btnIncluir_Click" />&nbsp;&nbsp;
                        <asp:Button ID="btnLimpar" runat="server" Text="Limpar" Width="110px" 
                            onclick="btnLimpar_Click" />
                    </td>
                </tr>
            </table>
            
        </td>
    </tr>
    
    <tr>
        <td>
        
            <table width="99%" align="right">
                <tr>
                    <td>
                        <div class="subTitulo_pagina">Histórico de parâmetros</div>
                        <div class="espaco"></div>
                    </td>
                </tr>
                <tr>
                    <td>
                    
                        <telerik:RadGrid ID="RadGrid1" Width="100%" Skin="Telerik" 
                            runat="server" AllowPaging="True" AllowSorting="True"
                            GridLines="None" AutoGenerateColumns="false" PageSize="20" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCommand="RadGrid1_ItemCommand">
                            <MasterTableView GridLines="None" DataKeyNames="IdWfConfig">
                                <Columns>
                                    <telerik:GridBoundColumn UniqueName="IdWfConfig" HeaderText="Código" DataField="IdWfConfig" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="DataInicio" HeaderText="Data Inicio" DataField="DataInicio" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="DataFim" HeaderText="Data Fim" DataField="DataFim" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="Status.Descricao" HeaderText="Status" DataField="Status.Descricao" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="TxtExecutato" HeaderText="Executado" DataField="TxtExecutato" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridButtonColumn Text="Visualizar" CommandName="Visualizar"  UniqueName="SelectColumn" />
                                    <telerik:GridButtonColumn DataTextField="AcaoDesativar" CommandName="Desativar"  UniqueName="SelectColumn2" />
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>  
                    
                    </td>    
                </tr>
                
                <tr>
                    <td align="right">
                        <br /><a href="acWorkflow.aspx">Voltar</a>
                    </td>
                </tr>
            </table>
            
        </td>
    </tr>
    
</table>
    
</asp:Content>

